<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <link rel="stylesheet" type="text/css" href="style.css" />
   </head>
   <body onload="if (top.frames['componentsframe'] == undefined) { s = window.location.toString(); window.location = 'index.html?p=' + s.substring(s.lastIndexOf('/')+1); }">
<h2 class="comptitle">NED File <i>src/modules/nic/Nic80211MultiChannel.ned</i></h2>
<table class="typestable">
   <tr>
      <th class="name">Name</th>
      <th class="type">Type</th>
      <th class="description">Description</th>
   </tr>
<tr>
   <td>
<a href="org.mixim.modules.nic.Nic80211MultiChannel.html">Nic80211MultiChannel</a>
   </td>
   <td>
<i>compound&nbsp;module</i>
   </td>
   <td>

<p>This NIC implements an 802.11 network interface card with multi channel 
support and power consumption.
Note: This NIC does not model interference between adjacent channels!</p>

   </td>
</tr>
</table>
<h3 class="subtitle">Source code:</h3>
<pre class="src"><span style="color: #808080; font-style: italic; ">//***************************************************************************
// * file:        Nic80211.ned
// *
// * author:      Marc Loebbers
// *
// * copyright:   (C) 2004 Telecommunication Networks Group (TKN) at
// *              Technische Universitaet Berlin, Germany.
// *
// *              This program is free software; you can redistribute it
// *              and/or modify it under the terms of the GNU General Public
// *              License as published by the Free Software Foundation; either
// *              version 2 of the License, or (at your option) any later
// *              version.
// *              For further information see file COPYING
// *              in the top level directory
// ***************************************************************************
// * part of:     framework implementation developed by tkn
// **************************************************************************/
</span><span style="color: #800000; font-weight: bold; ">package</span><span style="color: #000000; "> </span><span style="color: #000000; ">org</span><span style="color: #000000; ">.</span><span style="color: #000000; ">mixim</span><span style="color: #000000; ">.</span><span style="color: #000000; ">modules</span><span style="color: #000000; ">.</span><span style="color: #000000; ">nic</span><span style="color: #000000; ">;

</span><span style="color: #808080; font-style: italic; ">//
// This NIC implements an 802.11 network interface card with multi channel 
// support and power consumption.
// Note: This NIC does not model interference between adjacent channels!
//
// </span><span style="color: #000080; ">@see</span><span style="color: #808080; font-style: italic; "> Mac80211MultiChannel, Decider80211MultiChannel
// </span><span style="color: #000080; ">@author</span><span style="color: #808080; font-style: italic; "> Karl Wessel
//
</span><span style="color: #800000; font-weight: bold; ">module</span><span style="color: #000000; "> </span><span style="color: #000000; ">Nic80211MultiChannel</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">extends</span><span style="color: #000000; "> </span><span style="color: #000000; ">WirelessNicBattery</span><span style="color: #000000; ">
{
    </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
        </span><span style="color: #000000; ">macType</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;Mac80211MultiChannel&quot;</span><span style="color: #000000; ">);
        
    	</span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;i=block/ifcard&quot;</span><span style="color: #000000; ">);
        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">onCurrent</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">mA</span><span style="color: #000000; ">) = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">0</span><span style="color: #000000; ">);
    
        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">queueLength</span><span style="color: #000000; ">             = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">20</span><span style="color: #000000; ">);
        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">bitrate</span><span style="color: #000000; ">                 = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">2</span><span style="color: #000000; ">E</span><span style="color: #000000; ">+</span><span style="color: #008000; ">6</span><span style="color: #000000; ">bps</span><span style="color: #000000; ">);            
        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">autoBitrate</span><span style="color: #000000; ">             = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">false</span><span style="color: #000000; ">);
        </span><span style="color: #808080; font-style: italic; ">// values if no fading is modelled, gives at most 1% packet error rate
</span><span style="color: #000000; ">        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">snr2Mbit</span><span style="color: #000000; ">                = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">1</span><span style="color: #000000; ">.</span><span style="color: #008000; ">46</span><span style="color: #000000; ">dB</span><span style="color: #000000; ">); 
        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">snr5Mbit</span><span style="color: #000000; ">                = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">2</span><span style="color: #000000; ">.</span><span style="color: #008000; ">6</span><span style="color: #000000; ">dB</span><span style="color: #000000; ">);
        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">snr11Mbit</span><span style="color: #000000; ">               = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">5</span><span style="color: #000000; ">.</span><span style="color: #008000; ">68</span><span style="color: #000000; ">dB</span><span style="color: #000000; ">);
        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">neighborhoodCacheSize</span><span style="color: #000000; ">   = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">30</span><span style="color: #000000; ">);
        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">neighborhoodCacheMaxAge</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">100</span><span style="color: #000000; ">s</span><span style="color: #000000; ">);
        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">txPower</span><span style="color: #000000; ">                 = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">110</span><span style="color: #000000; ">.</span><span style="color: #008000; ">11</span><span style="color: #000000; ">mW</span><span style="color: #000000; ">);

        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">headerLength</span><span style="color: #000000; ">        = </span><span style="color: #008000; ">192</span><span style="color: #000000; ">bit</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">sensitivity</span><span style="color: #000000; ">         = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(-</span><span style="color: #008000; ">119</span><span style="color: #000000; ">.</span><span style="color: #008000; ">5</span><span style="color: #000000; ">dBm</span><span style="color: #000000; ">);
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">decider</span><span style="color: #000000; ">             = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #800080; font-weight: bold; ">xmldoc</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;Nic80211MultiChannel_Decider.xml&quot;</span><span style="color: #000000; ">));
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">nbRadioChannels</span><span style="color: #000000; ">     = </span><span style="color: #008000; ">15</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">initialRadioChannel</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">1</span><span style="color: #000000; ">);
            
        </span><span style="color: #808080; font-style: italic; ">//Mac80211 does not support switching times
</span><span style="color: #000000; ">        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">timeRXToTX</span><span style="color: #000000; ">          = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">timeRXToSleep</span><span style="color: #000000; ">       = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">timeTXToRX</span><span style="color: #000000; ">          = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">timeTXToSleep</span><span style="color: #000000; ">       = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">timeSleepToRX</span><span style="color: #000000; ">       = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">timeSleepToTX</span><span style="color: #000000; ">       = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
}

</span></pre>
   <hr><p class="footer"><a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top"><img src="by-sa.png"></a> This documentation is released under the <a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top">Creative Commons license</a></p>
   </body>
</html>
